package com.fowo.api.model.supplier;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 供应商 导入导出辅助模型 */
@Getter
@Setter
public class SupplierExcelPo {

  @NotBlank(message = "供应商简称不能为空")
  @Size(max = 50, message = "供应商简称长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*供应商简称")
  private String supplierName;

  @NotBlank(message = "供应商名称不能为空")
  @Size(max = 50, message = "供应商名称长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*供应商名称")
  private String supplierFullName;

  @Size(max = 50, message = "供应商代码长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "供应商代码")
  private String supplierCode;

  @Size(max = 50, message = "备注长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "备注")
  private String remarks;

  @Size(max = 50, message = "状态长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "状态")
  private String status;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "关联仓库")
  private String wareHouseName;

  @ExcelIgnore
  @ExcelProperty(value = "关联仓库")
  private Long wareHouse;

  @Size(max = 50, message = "结算方式长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "结算方式")
  private String settleMethods;

  @DateTimeFormat("yyyy年MM月dd日HH:mm:ss")
  @ExcelProperty(value = "创建时间")
  private java.util.Date createDate;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "系统用户")
  private String sysUserIdName;

  @ExcelIgnore
  @ExcelProperty(value = "系统用户")
  private Long sysUserId;
}
